//
//  BHSettingUtil.h
//  Behing
//
//  Created by Lj on 2017/9/27.
//  Copyright © 2017年 lj. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface BHSettingUtil : NSObject

// 给某个view添加手势
+ (void)addTapGestureInView:(UIView *)inView addTarget:(id)target action:(SEL)action withTag:(NSInteger)viewTag;

//给某个view添加黑白渐变
+ (void)addGradient:(UIView *)inView alpha:(CGFloat)alpha;

// 判断数据是否为空或空对象(如果字符串的话是否为@"")
+ (BOOL)dataAndStringIsNull:(id)string;

/** 设置label的 部分字体的颜色大小 */
+ (void)setAttributeLabel:(UILabel *)label font:(UIFont *)font color:(UIColor *)color rangeArray:(NSArray *)array;


/** 计算Label的宽度 */
+ (CGFloat)widthForText:(NSString *)string fontSize:(CGFloat)fontSize;

+ (CGFloat)LabelStrHeight:(NSString *)labelStr font:(UIFont *)font sizeWidth:(CGFloat)width maximumNumber:(CGFloat)height ;

/** 计算Lbale的高度 */
+ (CGFloat)heightForText:(NSString *)string font:(UIFont *)font maxWidth:(CGFloat)maxWidth withTextLineSpace:(CGFloat)textLineSpace;

//加载HTML
+ (void)HTMLTextDocumentStr:(void(^)(NSMutableAttributedString *attributedStr, CGFloat height))callbackBlock htmlStr:(NSString *)htmlStr;

/** 计算金额 */
+ (NSString *)amountConversion:(NSString *)price;

/**
 *   时间戳转时间
 *   @param string /Data(13712380123)/
 *
 *   @return value description
 */
+ (NSString *)conversionTime:(NSString *)string dateFormat:(NSString *)format;

/** 获取当前时间 */
+ (NSString *)fetchCurrentTime;

/** 输入金额的判断 */
+ (BOOL)isInputAmountConversion:(NSString *)price textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range;

//密码判断
+ (BOOL)validatePassword:(NSString *)passWord;

//页面翻转
+ (void)transitformShowView:(UIView *)view hiddenView:(UIView *)toView completion:(void(^)(BOOL finished))finished;

//MD5加密
+ (NSString *) MD5:(NSString *)str;


@end












